const AppointApi = {
  addAppoint: function(data) {
    return service.post('appoint', data)
  },
  editAppoint(data) {
    return service.put('appoint', data)
  },
  updateAppoint(data) {
    return service.put('appoint/update', data)
  },
  updateAppointState(data) {
    return service.put('appoint/updateState', data)
  },
  appointReportBack(data) {
    // 撤回预约单
    return service.get('appoint/backReport', {params: data })
  },
  resetAppointFile(data) {
    // 重置预约单文件
    return service.get('appoint/resetAppointFile', {params: data })
  },
  deleteAppoint(data) {
    return service.delete('appoint', {params: data })
  },
  listAppointRecord(data) {
    // 预约操作记录
    return service.get('appoint/records', {params: data })
  },
  listAppoint(data) {
    return service.get('appoints', {params: data })
  },
  getAppointInfo(data) {
    return service.get('appoint', {params: data })
  },
  getAppointCounts(data) {
    return service.get('appoint/counts', {params: data })
  },
  appointReportPrint(data) {
    return service.get('appoint/reportPrint', {params: data })
  },
  appointReportUpload(data) {
    return service.post('appoint/uploadReport', data)
  },
  appointInsSelect(data) {
    // 可预约的机构列表
    return service.get('appointInsSelect', {params: data })
  },
  appointItemSelect(data) {
    // 可预约的机构项目
    return service.get('appointItemSelect', {params: data })
  },

  getFilesByAppointId(data) {
    return service.get('appointPayFile/getFilesByAppointId', {params: data })
  },

  listPayFileByAppointId(data) {
    return service.get('appointPayFile/listByAppointId', {params: data })
  },

  uploadAppointPayFile(data) {
    // 上传预约支付凭证
    return service.post('appointPayFile', data)
  },
  listHealthFile(data) {
    // 下级医院上传的病情图片列表
    return service.get('appoint/listHealthFile', {params: data })
  },
  addExamine(data) {
    // 添加上级医院对下级病情的分析结果
    return service.post('appoint/addExamine', data)
  },


}

import service from '@/utils/request'

export default AppointApi
